import { AtGrid } from "taro-ui"
import {Component} from 'react'
import Taro from '@tarojs/taro'
import {IMAGEURL} from '../../constants/global'

import 'taro-ui/dist/style/components/grid.scss'
import './hotSpotsHeader.less'

class HotSpotsHeader extends Component{

  itemClick(item,index){
    console.log(item,index);
    // console.log(IMAGEURL);
    if(index===3){
      Taro.navigateTo({
        url: 'hotSpotsNous'
      })
    }
  }

  render(){
    return(
      <AtGrid className="titleBars" onClick={this.itemClick.bind(this)} data={
        [
          {
            image: 'https://www.juntaitec.cn/wechatapp/images/jqys.svg',
            value: '节气养生'
          },
          {
            image: 'https://www.juntaitec.cn/wechatapp/images/zwbj.svg',
            value: '自我保健'
          },
          {
            image: 'https://www.juntaitec.cn/wechatapp/images/yssl.svg',
            value: '药膳食疗'
          },
          {
            image: 'https://www.juntaitec.cn/wechatapp/images/zycs.svg',
            value: '中药常识'
          },
          {
            image: 'https://www.juntaitec.cn/wechatapp/images/zzwh.svg',
            value: '中医文化'
          },
          {
            image: 'https://www.juntaitec.cn/wechatapp/images/ekjk.svg',
            value: '儿科健康'
          }
        ]
      } />
    )
  }
}
export default HotSpotsHeader
